﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MVCPets.Models.PetsModel>" %>
<%@ Import Namespace="MVCPets.Helpers" %>
<%@ Import Namespace="MVCPets.Extensions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Pet Details
</asp:Content>


<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Pet Details</h2>

    <% Html.RenderPartial("PetsDetailItem", Model); %>    

    <p>
        <% if (Request.IsAuthenticated && SessionHelper.UserRole <= RoleHelper.GetRoleValue("Contributor")) %>
          <% { %>
              <%= Html.ActionLink("[Edit]", "Edit", "PetManagement", new { id = Model.ID }, null) %> |
              <%= Html.ActionLink("[Delete]", "Delete", "PetManagement", new { id = Model.ID }, null) %> |
          <% } %>
        
        <%= Html.ActionLink("[Back to List]", "Index") %>
    </p>

</asp:Content>